package service.impl;

import dao.UserDao;
import entity.User;
import org.apache.ibatis.session.SqlSession;
import service.UserService;
import util.Util;

public class UserServiceImpl implements UserService {
    UserDao dao;
    SqlSession session=Util.getSession();
    public void regist(User u) {
        dao= session.getMapper(UserDao.class);
        dao.insert(u);
        session.commit();
        session.close();
    }
}
